#ifndef __INCLUDE__ALL__H__
#define __INCLUDE__ALL__H__

#define DEBUG			0

#define STATISTICS_INTERVAL	2
#define BROADCASE_INTERVAL	2
#define EPOLL_RUN_TIMEOUT	1000

#define READBUF_SIZE		1024
#define SENDBUF_SIZE		1024

#define TCP_PORT		50001
#define BROADCASE_PORT		60009
#ifdef FD_SETSIZE
#define EPOLL_SIZE		(FD_SETSIZE - 5)
#else
#define EPOLL_SIZE		1000
#endif

#ifndef RET_OK
#ifndef EXIT_SUCCESS
#include <stdlib.h>
#endif
#define RET_OK			EXIT_SUCCESS
#endif

#ifndef RET_FAIL
#ifndef EXIT_FAILURE
#include <stdlib.h>
#endif
#define RET_FAIL		EXIT_FAILURE
#endif

enum
{
	RT_INITOK,
	RT_UDP,
	RT_TCP,

	RT_LAST
};

struct watchdog_info
{
	unsigned int runtable;

	void (*run_reg)(int);
	int (*run_get)(int);
	void (*run_unreg)(int);

	void (*report_reg)(const char const *,const char const *,const char const *);
};

#if (STATISTICS_INTERVAL < 1) || (BROADCASE_INTERVAL < 1)
#error -------Please check "include_all.h"-------
#endif

#if (TCP_PORT < 0) || (TCP_PORT > 65535) || (BROADCASE_PORT < 0) || (BROADCASE_PORT > 65535)
#error -------Port define error-------
#endif

#endif
